import request from "@/utils/request";
import { v4 as uuidv4 } from 'uuid';

// 参建单位列表
export function getList(data) {
  return request({
    url: `/api/enterprise/getEnterprisePageList`,
    method: 'post',
    data
  })
}
// 新增参建单位
export function submitUnit(data) {
  return request({
    url: `/api/enterprise/save`,
    method: 'post',
    data: { data, "rid": uuidv4() }
  })
}
// 编辑参建单位
export function editUnit(data) {
  return request({
    url: `/api/enterprise/updateById`,
    method: 'post',
    data: { data, "rid": uuidv4() }
  })
}
// 删除参建单位
export function deleteUnit(params) {
  return request({
    url: `/api/enterprise/deleteById`,
    method: 'get',
    params
  })
}
export function add(data) {
  return request({
    url: `/api/api/cmsBrandEnter/create`,
    method: 'post',
    data
  })
}
export function save(data) {
  return request({
    url: `/api/api/cmsBrandEnter/save`,
    method: 'post',
    data
  })
}
export function detail(data) {
  return request({
    url: `/api/api/cmsBrandEnter/detail`,
    method: 'post',
    data
  })
}
export function detail2(data) {
  return request({
    url: `/api/api/cmsCertificatePublicity/detail`,
    method: 'post',
    data
  })
}
